import type { ButtonType } from "antd/es/button";
export interface HeaderPropsType {
	isDetail?: boolean;
	showDetailBack?: boolean;
	title?: string;
}

export interface FooterPropsType {
	confirmLoading?:
		| boolean
		| {
				delay?: number;
		  };
	// Show close button
	showCancelBtn?: boolean;
	cancelButtonProps?: Recordable;
	cancelText?: string;
	// Show confirmation button
	showOkBtn?: boolean;
	okButtonProps?: Recordable;
	okText?: string;
	okType?: ButtonType;
	showFooter?: boolean;
	footerHeight?: string | number;
	height?: string | number;
}
export const FooterPropsDefault = {
	showCancelBtn: true,
	cancelText: "component.drawer.cancel", // 国际化
	// Show confirmation button
	showOkBtn: true,
	okText: "component.drawer.submit", // 国际化
	okType: "primary",
	footerHeight: 60,
	height: 60,
	showFooter: true
};

export interface DrawerPropsType extends FooterPropsType {
	isDetail?: boolean;
	title?: string;
	loadingText?: string;
	showDetailBack?: boolean;
	open?: boolean;
	loading?: boolean;
	maskClosable?: boolean;
	getContainer?: object | string;
	closeFunc?: Function | object;
	destroyOnClose?: boolean;
}

export const DrawerPropsDefault = {
	title: "",
	isDetail: false,
	showDetailBack: true,
	maskClosable: true,
	...FooterPropsDefault
};
